#ifndef PROTOSCENE_H
#define PROTOSCENE_H

#include <AGTObjectSystem/ObjectSceneManager.h>
#include <AGTRenderSystem/RenderManager.h>

// Include objects
#include "Light.h"
#include "PlayerCharacter.h"

class ProtoScene : public ObjectScene
{
private:	// Attributes
public:		// Methods
	ProtoScene()
	{
		m_SceneName = "ProtoScene";

		if(addToManager())
		{
			setupScene();
			createScene();
		}
	};
	~ProtoScene(){};

	void setupScene(void)
	{
		// Only setup scene attributes. Other things such as light is based on Objects and manage by
		// the object manager.
		// Scene setup for shadows and skybox
		m_SceneMgr = RenderManager::getSingleton()->getRoot()->createSceneManager(Ogre::ST_GENERIC,m_SceneName);
		m_SceneMgr->setAmbientLight(Ogre::ColourValue(0.8,0.5,0.8));
		
	}

	void createScene(void)
	{
		// Create scene creates all objects-component objects in the scene. Object must be added to the scenes
		// object manage in order to get updated. Needed for message handling and updating components in objects
		Light* l = new Light();
		m_ObjMgr->manageObject(l);
		CompTest_Light* compL = new CompTest_Light();

		PlayerCharacter* player = new PlayerCharacter();
		m_ObjMgr->manageObject(player);
		Comp_Mesh_Static* mesh_static = new Comp_Mesh_Static("dog.mesh");

		
		// Add compent to the new object and then initialise that component.
		l->ManageComponent(compL);

		player->ManageComponent(mesh_static);
		
	};

	bool addToManager(void)
	{
		return ObjectSceneManager::getSingleton()->ManageScene(this);
	};
};

#endif